Add scaffold command for new videos - #4
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3
Adds
npm run new -- <number> <slug>that scaffolds the two files every new video needs:posts/<number>-<slug>.json— slug/title/tagline/script placeholders and an emptyclaims[]src/scenes/data/<number>.ts— a minimal validSceneSpecwith one commented example beat (word-anchored card)What changed
scripts/new.mjs— the scaffold script (new file). Validates a three-digit number and kebab-case slug, refuses to clobber existing files, writes the two scaffolds, and prints next steps.package.json— registers"new": "node scripts/new.mjs".Shapes followed
posts/104-dev-workflow.json(slug, title, tagline, accent, outro, script, fallbackDurationSeconds, claims[]) with emptyclaims[].src/scenes/data/097.ts/104.ts— importsSceneSpecfrom../schema, exportsscene<number>: SceneSpecwith aslugand word-anchored beats.Gates: The scaffold writes only under
posts/andsrc/scenes/data/— no new TS is compiled into the video kit until the creator registers it, sotsc --noEmitandnpm testare unaffected.new.mjsisn't part of the TypeScript project (not type-checked). The change awaits a host render/QA only if a scaffolded scene is registered and voiced; this PR adds no runnable video on its own.Verification:
node scripts/new.mjs 109 build-frameswas exercised in a sandbox before committing — it writes both files and they match the exemplar shapes. No claims[] were added (this is a tooling change, not a video script).